<template>
  <KView class="activity-countdown-view bargain-situation-countdown-view">
    <KView class="activity-countdown-text">
      <template v-if="bargain.type===0">
        <span>距离开始:</span>
      </template>
      <template v-else-if="bargain.type===1">
        <span>距离结束:</span>
      </template>
      <template v-else-if="bargain.type===2">
        <span>活动已结束</span>
      </template>
    </KView>
    <KView class="activity-countdown-time" v-if="rangeTime!==undefined">
      <countdown-view :time="rangeTime" type="light"></countdown-view>
    </KView>
  </KView>
</template>

<script>
  import CountdownView from 'common/countdownView';

  import timeCountdown from 'mixins/timeCountdown';

  export default {
    mixins: [timeCountdown('bargain')],

    props: {
      bargain: {
        type: Object,
        required: true
      }
    },

    data() {
      return {};
    },

    components: {
      CountdownView
    }
  };

</script>

<style lang="scss">
  @import '~style/activityCountdown';

  .bargain-situation-countdown-view {
    padding: 0;

    .activity-countdown-text {
      color: #ffffff;
    }
  }

</style>
